package tech.aistar.corejava.day05;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:带参构造如何进行参数有效性赋值
 * @date 2019/7/22 0022
 */
public class ConstructorParamValidDemo {
    public static void main(String[] args) {
        Student s = new Student();
        s.setSname("cnm");
        System.out.println(s);

        System.out.println(s.getSname());

        Student s2 = new Student(2,"cnm");
        System.out.println(s2);
    }
}
